import 'package:flutter/material.dart';

///GridView
///
class GridViewDemo extends StatefulWidget {
  const GridViewDemo({Key? key}) : super(key: key);

  @override
  _GridViewDemoState createState() => _GridViewDemoState();
}

class _GridViewDemoState extends State<GridViewDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("GridView"),
        centerTitle: true,
      ),
      body: GridView(
        scrollDirection:Axis.vertical ,
        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
            crossAxisCount: 6, crossAxisSpacing: 10, mainAxisSpacing: 10),
        children: [
          Container(
            child: Icon(Icons.add),
            color: Colors.blue,
          ),
          Container(
            child: Icon(Icons.h_mobiledata),
            color: Colors.blue,
          ),
          Container(
            child: Icon(Icons.home),
            color: Colors.blue,
          ),
          Container(
            child: Icon(Icons.cabin_outlined),
            color: Colors.blue,
          ),
          Container(
            child: Icon(Icons.access_alarm),
            color: Colors.blue,
          ),
          Container(
            child: Icon(Icons.backpack),
            color: Colors.blue,
          ),
          Container(
            child: Icon(Icons.cabin_outlined),
            color: Colors.blue,
          )
        ],
      ),
    );
  }
}
